﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Web;

namespace UCenter.PluginFramework.Utilities
{
    public sealed class FilesUtils
    {
        public static DirectoryInfo GetRootDirectory()
        {
            DirectoryInfo root = new DirectoryInfo(RootPath);
            if (!root.Exists)
            {
                throw new Exception(String.Format("The path of {0} does not exist.", RootPath));
            }
            return root;
        }

        public static string RootPath
        {
            get
            {
                return HttpContext.Current.Server.MapPath("/Extensions");
            }
        }
    }
}
